# !/usr/bin/env python
# -*-coding:utf-8 -*-

"""
# File       : const.py
# Time       ：2024/8/27 22:43
# Author     ：author name
# version    ：python 3.10
# Description：默认参数
"""

DEFAULT_CONFIG = [
    {
        "desc": "重试次数。默认为重试3次。",
        "config_name": "retry_time",
        "config_label": "失败重试次数",
        "config_value": "3"
    },
    {
        "desc": "重试策略的休眠时间。默认为1秒。",
        "config_name": "sleep_time",
        "config_label": "重试等待时间",
        "config_value": "1"
    },
    {
        "desc": "默认任务的超时时间。默认120秒。",
        "config_name": "task_timeout",
        "config_label": "任务超时时间",
        "config_value": "120"
    },
    {
        "desc": "失败情况下进行回调。默认为失败，可选为失败、成功、重试、忽略、跳过。",
        "config_name": "notice_type",
        "config_label": "通知方式",
        "config_value": [
            {
                "label": "失败",
                "value": "FAILURE"
            },
            {
                "label": "成功",
                "value": "SUCCESS"
            },
            {
                "label": "重试",
                "value": "RETRY"
            },
            {
                "label": "忽略",
                "value": "SKIP"
            }
        ]
    },
    {
        "desc": "任务异常处理策略。默认为报错，可选为报错，重试，忽略。",
        "config_name": "task_strategy",
        "config_label": "异常处理",
        "config_value": [
            {
                "label": "报错",
                "value": "RAISE"
            },
            {
                "label": "重试",
                "value": "RETRY"
            },
            {
                "label": "忽略",
                "value": "SKIP"
            }
        ]
    },
    {
        "desc": "任务异常回调方法。默认为邮件。",
        "config_name": "callback_module",
        "config_label": "异常回调",
        "config_value": "Email"
    },
    {
        "desc": "True为独占任务，False为非独占任务",
        "config_name": "is_corner",
        "config_label": "独占任务",
        "config_value": "1"
    },
    {
        "desc": "是否为有状态任务。",
        "config_name": "is_state",
        "config_label": "状态任务",
        "config_value": "0"
    }
]
